package com.gshrms.org.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gshrms.system.domain.dto.SysUserJoinDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.gshrms.common.annotation.Excel;
import com.gshrms.common.core.domain.TreeEntity;

import java.util.*;

/**
 * 职位序列对象 org_post_serial
 * 
 * @author ruoyi
 * @date 2024-10-29
 */
@Data
public class OrgPostSerial
{
    private static final long serialVersionUID = 1L;

    /** 职位序列ID */
    @TableId(type = IdType.AUTO)
    private Long postSerialId;


    /** 父菜单ID */
    private Long parentId;

    /** 祖级列表 */
    @ApiModelProperty("ancestors")
    private String ancestors;

    /** 职位序列名称 */
    @Excel(name = "职位序列名称")
    private String postSerialName;


    /** 职级类别 */
    @Excel(name = "职级类别")
    private Long postCategoryId;

    /** 组织状态（0正常 1停用） */
    @Excel(name = "组织状态", readConverterExp = "0=正常,1=停用")
    private String status;

    @ApiModelProperty("显示顺序")
    private Integer orderNum;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long createId;

    @TableField(exist = false)
    private SysUserJoinDto createInfo;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;


    /** 父菜单名称 */
    @TableField(exist = false)
    private String parentName;


    /** 祖级列表名称 */
    @TableField(exist = false)
    private String ancestorsName;


    /** 子部门 */
    @TableField(exist = false)
    private List<?> children = new ArrayList<>();


    /** 请求参数 */
    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params = new HashMap<>();




    public void setPostSerialId(Long postSerialId) 
    {
        this.postSerialId = postSerialId;
    }

    public Long getPostSerialId() 
    {
        return postSerialId;
    }
    public void setPostSerialName(String postSerialName) 
    {
        this.postSerialName = postSerialName;
    }

    public String getPostSerialName() 
    {
        return postSerialName;
    }
    public void setPostCategoryId(Long postCategoryId) 
    {
        this.postCategoryId = postCategoryId;
    }

    public Long getPostCategoryId() 
    {
        return postCategoryId;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setCreateId(Long createId) 
    {
        this.createId = createId;
    }

    public Long getCreateId() 
    {
        return createId;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public SysUserJoinDto getCreateInfo() {
        return createInfo;
    }

    public void setCreateInfo(SysUserJoinDto createInfo) {
        this.createInfo = createInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("postSerialId", getPostSerialId())
            .append("parentId", getParentId())
            .append("postSerialName", getPostSerialName())
            .append("postCategoryId", getPostCategoryId())
            .append("status", getStatus())
            .append("orderNum", getOrderNum())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
